package com.zjitc.dao;

import com.zjitc.pojo.Car;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Create By IntelliJ IDEA
 *
 * @author: myq
 * @create-Time: 2017/11/20  17:09
 */
public interface CarDao {

  /**
   * 检查购物车
   * @param uid
   * @param pid
   * @return
   */
  List<Car> checkcar(@Param("uid") String uid, @Param("pid") String pid);

  /**
   * 更新购物车
   * @param uid
   * @param count
   * @param pid
   * @return
   */
  int updatecar(@Param("uid") String uid, @Param("count") int count, @Param("pid") String pid);

  /**
   * 添加新商品
   * @param uid
   * @param count
   * @param pid
   * @return
   */
  int addnew(@Param("uid") String uid, @Param("count") int count, @Param("pid") String pid);

  /**
   * 清空购物车
   * @param uid
   * @return
   */
  int deleteAll(@Param("uid") String uid);

  /**
   * 通过pid 删除购物车内商品
   * @param pid
   * @param uid
   * @return
   */
  int deletebypid(@Param("pid") String pid, @Param("uid") String uid);

}
